[#ftl]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>[#assign module]userbinds[/#assign][#assign moduleName="UserBind"]
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加新${moduleName}</title>
<script type="text/javascript" src="${base}/commonjs/jquery1.7.2/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="${base}/commonjs/jquery-forms.js"></script>
<script type="text/javascript" src="${base}/commonjs/jquery.select.js"></script>
<script type="text/javascript" src="${base}/commonjs/artDialog4/artDialog.source.js?skin=blue"></script>
<script type="text/javascript" src="${base}/commonjs/artDialog4/plugins/iframeTools.source.js"></script>
<script type="text/javascript">
$(function(){
  $("#btadditem").bind("click", function(){
    $("#additemform").ajaxForm({
      dataType: "json",
      success: function(json){
        if(!json.success){
          art.dialog.through({
            title: "[#if (item.id)??]编辑${moduleName}信息[#else]添加新${moduleName}[/#if]失败",
            icon: "error",
            content: "[#if (item.id)??]编辑${moduleName}信息[#else]添加新${moduleName}[/#if]失败！<br>"+json.err,
            width: 250,
            height: 150,
            background: '#EEE', // 背景色
            opacity: 0.05,  // 透明度
            lock: true,
            ok: true
          });
        }else{
          try{
             art.dialog.open.origin.flexGridReload(".flexme3");
          }catch(e){
             try{
                 art.dialog.top.frames["_iframe"].window.flexGridReload(".flexme3");
             }catch(e){
                 art.dialog.top.window.flexGridReload(".flexme3");
             }
          }
          art.dialog.close();
        }
      }
    });
  });
});
</script>
</head>
<body>
<h3>[#if (item.id)??]编辑${moduleName}信息[#else]添加新${moduleName}[/#if]</h3>
<form id="additemform" action="${base}/${module}/${((item.id)??)?string('edit','add')}" method="POST">
<input type="hidden" name="id" value=${(item.id)!0}>
${moduleName}名:<input type="text" name="name" value="${(item.name)!}"/><br>
描述:<textarea rows="3" cols="35" name="description">${(item.description)!}</textarea><br>
openid:<input type="text" name="openid" value="${(item.openid)!}"><br>
头像:<input type="text" name="avatar" value="${(item.avatar)!}"><br>
空间地址:<input type="text" name="url" value="${(item.url)!}"><br>
来自:<input type="text" name="domain" value="${(item.domain)!}"><br>
类型:<input type="text" name="type" value="${(item.type)!}"><br>

<input type="submit" value="保存新${moduleName}" id="btadditem">
</form>
</body>
</html>